<?php
namespace Home\Controller;
use Think\Controller;
class UserlistController extends BaseController {
    public function index(){
        $Model = new \Think\Model();
        $sql = 'select u.nickname ukname,u.logintime utime,u.id uid,p.headpic pheadpic,p.shanchangtitle1 psct1,p.shanchangtitle2 psct2,p.zuopintitle1 pzp1,p.zuopintitle2 pzp2 from pro_user as u, pro_userinfo as p where u.id=p.uid';
        $data = $Model->query($sql);
        //dump($data);
        // $m = M('userinfo');
        // $user = $m->order("id desc")->select();
        // dump($user);
        // $mm = M('user');
        // $data = $mm->where("id = {$id}")->select();

        // $this->assign('text',$data);
        // $m=M("user");
        // $arr = $m->order("id desc")->select();
        // $i = $m->where()->find();
        // $id=$i['id'];
        // $this->assign("userlist",$arr);
        // dump($arr);
        // $mm=M('userinfo');
        // $userinfo = $mm->order("id = {$id} desc")->find();
        
        // dump($userinfo);
         $this->assign("userlist",$data);
        $this->display();
    }
}